package com.iotteam.androidbase.moudules.test_sensor.sensor_info_page;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.fanwe.library.switchbutton.ISDSwitchButton;
import com.fanwe.library.switchbutton.SDSwitchButton;
import com.iotteam.androidbase.R;
import com.iotteam.androidbase.base.BaseFragment;
import com.iotteam.androidbase.commen.views.SettingView;

/**
 * Created by vonchenchen on 13/08/2017.
 */

public class SettingPageFragment extends BaseFragment {

    protected View mRootView;
    private SettingView mEnableAlarmView;
    private SettingView mEnableLowPowerView;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if(mRootView == null) {
            mRootView = inflater.inflate(R.layout.fragment_setting_page, container, false);
        }

        mEnableAlarmView = (SettingView) mRootView.findViewById(R.id.sv_enable_alarm);
        mEnableLowPowerView = (SettingView) mRootView.findViewById(R.id.sv_enable_lowpower);

        mEnableAlarmView.setText("报警使能");
        mEnableLowPowerView.setText("节电使能");

        mEnableAlarmView.setOnCheckedChangedCallback(new ISDSwitchButton.OnCheckedChangedCallback() {
            @Override
            public void onCheckedChanged(boolean checked, SDSwitchButton view) {

            }
        });

        mEnableLowPowerView.setOnCheckedChangedCallback(new ISDSwitchButton.OnCheckedChangedCallback() {
            @Override
            public void onCheckedChanged(boolean checked, SDSwitchButton view) {

            }
        });

        return mRootView;
    }

    @Override
    protected void lazyLoad() {

    }
}